<template>
    <div class="Personnel">
        <div class="title">服务管理-人才简历管理</div>
        <!--top-->
        <div>
            <div class="lPersonTop">
                <!-- <div v-for=""> -->
                <div class="lPersonTop_box">
                    <div>{{companyInfo.fullName}}</div>
                    <div>{{companyInfo.contactName}}</div>
                    <div>{{companyInfo.cphone}}</div>
                    <div class="lPerson" @click="toCommunication(0)">
                        <!-- <button>沟通</button> -->
                        <img src="../../assets/imgs/duih.png"/>
                    </div>
                </div>
                <div class="lPersonTop_box">
                    <div>{{companyInfo.jobTitle}}</div>

                    <div>
                        <el-select v-model="jrrIds"
                                   @change='changeTalent'
                                   size="mini">
                            <el-option
                                    v-for="item in options"
                                    :key="item.id"
                                    :label="item.name"
                                    :value="item.id">
                            </el-option>
                        </el-select>
                    </div>
                    <div>{{ttphone[value]}}</div>
                    <div class="lPerson" @click="toCommunication(1)">
                        <!-- <button>沟通</button> -->
                        <img src="../../assets/imgs/duih.png"/>
                    </div>
                </div>
                <!-- </div> -->
            </div>
            <!-- <el-button>提交</el-button> -->
            <div class="flex-box flex-box-between shink0">
                <el-radio-group v-model="tabs">
                    <el-radio-button class="top-radio-button" label="1">人才简历</el-radio-button>
                    <el-radio-button class="top-radio-button" label="2">推荐报告</el-radio-button>
                </el-radio-group>
                <!--人才意向单选-->
                <div class="inputIntertion">
                    <h2>人才当前意向：</h2>
                    <el-radio-group v-model="companyInfo.inputIntertion">
                        <el-radio v-if="cType == 0 || companyInfo.inputIntertion == 1" :label="1">有</el-radio>
                        <el-radio v-if="cType == 0 || companyInfo.inputIntertion == 2" :label="2">无</el-radio>
                    </el-radio-group>
                    <el-button class="second-button" v-if="cType==0" type="primary" plain style="margin-left:10px"
                               @click="_updateStateByPrimaryKey">保存
                    </el-button>
                </div>
            </div>
            <div v-if="tabs==2" class="tabs-btn">
                <el-radio-group v-model="edit" size="small">
                    <el-radio-button :label="1">人才信息</el-radio-button>
                    <el-radio-button :label="2">手动填写</el-radio-button>
                </el-radio-group>
                <span> 模板更新时间：{{reportList.rdtime}}</span>
            </div>
            <!--简历信息-->
            <div class="tab-container resume" v-show="tabs==1">
                <div class="flex-box user">
                    <div class="avatar">
                        <img width="100" height="100" :src="Resume.image" alt="">
                    </div>
                    <div>
                        <div class="flex-box ">
                            <h3 style="font-size:24px;color:#333;">{{Resume.name}}</h3>
                            <p class="workState">{{Resume.jobState}}</p>
                        </div>
                        <div class="flex-box base">
                            <div class="flex-box">
                                <img src="../../assets/img/communication/age.png" height="16px"
                                     style="margin-right:5px;">
                                <p>{{Resume.age ? Resume.age + '岁': '---'}}</p>
                            </div>
                            <span style="padding:0 30px;">|</span>
                            <div class="flex-box">
                                <img src="../../assets/img/communication/experience.png" height="15px"
                                     style="margin-right:5px;">
                                <p>{{Resume.workDay ? Resume.workDay + '年经验' : '---'}}</p>
                            </div>
                            <span style="padding:0 30px;">|</span>
                            <div class="flex-box" style="height: 15px;">
                                <img src="../../assets/img/communication/address.png" height="16px"
                                     style="margin-right:5px;">
                                <p>{{Resume.city}}</p>
                            </div>
                            <span style="padding:0 30px;">|</span>
                            <div class="flex-box" style="padding:10px 0;">
                                <img src="../../assets/img/communication/salary.png" height="14px"
                                     style="margin-right:5px;">
                                <span v-if="Resume.tax == 0">税前&nbsp;</span>
                                <span v-if="Resume.tax == 1">税后&nbsp;</span>
                                <p>{{Resume.salaryPerMonth ? Resume.salaryPerMonth + 'W' : '---'}}/{{Resume.monthCount ?
                                    Resume.monthCount + '年' : '---' }}</p>
                            </div>
                        </div>
                        <div class="flex-box base2">
                            <div class="flex-box" style="padding-right: 0">
                                <img src="../../assets/img/communication/tel.png" height="16px"
                                     style="margin-right:5px;">
                                <p>{{Resume.phone}}</p>
                            </div>
                            <span style="padding:0 30px;">|</span>
                            <div class="flex-box" style="padding:10px 0;">
                                <img src="../../assets/img/communication/email.png" height="16px"
                                     style="margin-right:5px;">
                                <p>{{Resume.email}}</p>
                            </div>
                        </div>
                    </div>

                </div>
                <!--期望职位-->
                <div class="job" style=" margin-top:30px;">
                    <div class="flex-box" style="margin-bottom:20px">
                      <span class="box-line"></span>
                        <h3 style="color:#333;font-weight:blod;font-size:18px;">期望职位</h3><span
                            class="margin-l sub-color">必填</span>
                    </div>
                    <div class="flex-box" v-for="item in Resume.hopeJob" style="padding:0 0 20px 0;">
                        <div class="flex-box" style="padding:0 20px;">
                            <img src="../../assets/img/communication/address.png" style="margin-right:5px;">
                            <p>{{item.hopeCity}}</p>
                        </div>
                        <div class="flex-box" style="padding:0 20px;">
                            <img src="../../assets/img/communication/practice.png" style="margin-right:5px;">
                            <p>{{item.hopeLicenseStr}}</p>
                        </div>
                        <div class="flex-box" style="padding:0 20px;">
                            <img src="../../assets/img/communication/enter_type.png" style="margin-right:5px;">
                            <p>{{item.hopeCompanyTypeStr}}</p>
                        </div>
                        <div class="flex-box" style="padding:0 20px;">
                            <img src="../../assets/img/communication/salary.png" style="margin-right:5px;">
                            <span v-if="item.taxType == 0">税前&nbsp;</span>
                            <span v-if="item.taxType == 1">税后&nbsp;</span>
                            <p>{{item.salaryPerMonthLow}}-{{item.salaryPerMonthHigh}}/W {{item.yearNum}}年</p>
                        </div>
                    </div>
                </div>

                <!--工作经历-->
                <div class="work" style=" margin-top:30px;">
                    <div class="flex-box" style="margin-bottom:20px">
                       <span class="box-line"></span>
                        <h3 style="color:#333;font-weight:blod;font-size:18px;">工作经历</h3><span
                            class="margin-l sub-color">必填</span>
                    </div>
                    <div class="work-detail" v-for="item in Resume.jobExperiences"  style="padding:0 0 20px 20px;">
                        <div class="flex-box">
                            <h4 style="font-size: 16px;color: #555;font-weight: bold;">
                                {{item.companyName}}</h4>
                            <span class="margin-l"
                                  style="margin-left: 30px;">{{item.jobStartTime}}/{{item.jobEndTime}}</span>
                        </div>
                        <div class="flex-box" style="font-size: 14px;">
                            <p>{{item.jobName}}</p>
                            <span style="padding:0 30px;">|</span>
                            <p>{{item.licenseTypeStr}}</p>
                            <span style="padding:0 30px;">|</span>
                            <p>{{item.companyTypeStr}}</p>
                            <span style="padding:0 30px;">|</span>
                            <p>{{item.workCity}}</p>
                        </div>
                        <div style="margin-top: 10px;font-size: 14px;" v-html="item.jobContent"></div>
                    </div>
                </div>
                <!--项目经历-->
                <div class="work" style=" margin-top:30px;">
                    <div class="flex-box" style="margin-bottom:20px">
                       <span class="box-line"></span>
                        <h3 style="color:#333;font-weight:blod;font-size:18px;">项目经验</h3><span
                            class="margin-l sub-color">必填</span>
                    </div>
                    <div  style="padding:0 0 20px 20px;" class="work-detail" v-for="item in Resume.projectExperience">
                        <div class="flex-box">
                            <h4 style="font-size: 16px;color: #555;font-weight: bold;">
                                {{item.projectName}}</h4>
                            <span class="margin-l" style="margin-left: 30px;">{{item.projectStartTime}}/{{item.projectEndTime}}</span>
                        </div>
                        <div style="margin-top: 10px" v-html="item.projectContent"></div>
                    </div>
                </div>
                <!--执业证书-->
                <div class="job" style=" margin-top:30px;">
                    <div class="flex-box" style="margin-bottom:20px">
                       <span class="box-line"></span>
                        <h3 style="color:#333;font-weight:blod;font-size:18px;">执业证书</h3><span
                            class="margin-l sub-color">必填</span>
                    </div>
                    <div class="flex-box"  style="padding:0 0 20px 20px;" v-for="item in Resume.licenses">

                        <div class="flex-box">

                            <p style="font-size: 16px;color: #555;font-weight: bold;">
                                {{item.licenseTypeStr}}</p>
                        </div>
                        <div class="flex-box">
                            <i class="icon"></i>
                            <p>{{item.licenseNum}}</p>
                        </div>
                    </div>
                </div>
                <!--教育经历-->
                <div class="work" style=" margin-top:30px;">
                    <div class="flex-box" style="margin-bottom:20px">
                       <span class="box-line"></span>
                        <h3 style="color:#333;font-weight:blod;font-size:18px;">教育经历</h3><span
                            class="margin-l sub-color">必填</span>
                    </div>
                    <div class="work-detail" v-for="item in Resume.educationExperiences" style="padding:0 0 20px 20px;">
                        <div class="flex-box" style="padding-bottom: 10px;">
                            <h4 style="font-size: 16px;color: #555;font-weight: bold;">
                                {{item.school}}</h4>
                            <span class="margin-l" style="margin-left: 30px;">{{item.startTime}}/{{item.endTime}}</span>
                        </div>
                        <div class="flex-box" style="font-size: 14px;">
                            <p>{{item.major}}</p>
                            <span style="padding:0 30px;">|</span>
                            <p>{{item.academicStr}}</p>
                        </div>
                    </div>
                </div>
                <!--职称-->
                <div class="job" style=" margin-top:30px;">
                    <div class="flex-box" style="margin-bottom:20px">
                       <span class="box-line"></span>
                        <h3 style="color:#333;font-weight:blod;font-size:18px;">职称</h3><span class="margin-l"></span>
                    </div>
                    <div class="flex-box">
                        <div class="flex-box resume-tag">
                            <i class="icon"></i>
                            <el-tag v-for="item in Resume.title">{{item}}</el-tag>

                        </div>
                    </div>
                </div>
            </div>

            
            <!--推荐报告-->
            <div class="tab-container report" v-show="tabs==2&&edit==1">
                <h3 class="text-center">候选人评估报告</h3>
                <h3>尊敬的企业用户您好：</h3>
                <div class="language">
                    <div>为了让您有一个更加全面和细致的了解，节约您宝贵的面试时间， 提高您对候选人综合判断的准确性，
                        将候选人更加真实和内在的一面呈现在您的面前 ，我们特向您提供本报告。
                    </div>
                    <div>本报告共分为七大部分，分别为：</div>
                    <div>第一部分：候选人基本信息；</div>
                    <div>第二部分：候选人的知识与技能结构；</div>
                    <div>第三部分：候选人过往经历与主要业绩描述；</div>
                    <div>第四部分：候选人的个性特征与管理风格倾向；</div>
                    <div>第五部分：候选人的优劣势分析；</div>
                    <div>第六部分：核心胜任力构成；</div>
                    <div>第七部分：推荐建议。</div>
                </div>
                <!--第一部分-->
                <div class="basic marginB" style="line-height:36px;">
                    <div class="titleFont">第一部分：基本信息</div>
                    <div class="base basicFont">
                        <div>姓名：</div>
                        <div class="fontT fontLeft">{{Resume.name}}</div>
                    </div>
                    <div class="base  basicFont">
                        <div>性别：</div>
                        <div class="fontT fontLeft"><span v-if="Resume.sex == 0">男</span><span
                                v-if="Resume.sex == 1">女</span></div>
                    </div>
                    <div class="base  basicFont">
                        <div>出生年份：</div>
                        <div class="fontT fontLeft1">{{Resume.birth}}年</div>
                    </div>
                    <div class="base  basicFont">
                        <div>所在城市：</div>
                        <div class="fontT fontLeft1">{{Resume.city}}</div>
                    </div>
                    <div class="base  basicFont">
                        <div>期望职位：</div>
                        <div class="fontT fontLeft1" v-for="item in Resume.hopeJob">{{item.hopeLicenseStr}}</div>
                    </div>
                    <div class="base  basicFont">
                        <div>期望年薪：</div>
                        <div class="fontT fontLeft1" v-for="item in Resume.hopeJob">
                            <span v-if="item.taxType == 0">税前&nbsp;</span>
                            <span v-if="item.taxType == 1">税后&nbsp;</span>
                            {{item.salaryPerMonthLow}}-{{item.salaryPerMonthHigh}}W/{{item.yearNum}}年
                        </div>
                    </div>
                </div>
                <!--第二部分-->
                <div class="basic marginB">
                    <div class="titleFont">第二部分：知识与技能</div>
                    <div class="base marginT1 basicFont" v-for="item in Resume.educationExperiences">
                        <div class="fontSize marginR">教育经历:</div>
                        <div class="marginR1 fontSize">{{item.school}}</div>
                        <div class="marginR1 time">{{item.startTime}}/{{item.endTime}}</div>
                        <div>{{item.major}}</div>
                        <div class="empty1"></div>
                        <div>{{item.academicStr}}</div>
                    </div>
                    <div class="base marginT1 basicFont" v-for="item in Resume.licenses">
                        <div class="fontSize marginR">人才亮点:</div>
                        <!-- <div class="marginR1">{{item.licenseName}}</div> -->
                        <div class="marginR1">{{item.licenseTypeStr}}</div>
                    </div>
                </div>
                <!--第三部分-->
                <div class="basic marginB">
                    <div class="titleFont">第三部分：过往经历与业绩描述</div>
                    <!--工作经历-->
                    <div class="marginT1 basicFont" style="line-height:36px;">
                        <span class="fontSize marginR" style="width:140px;float:left;">工作经历:</span>
                        <div style="width:calc(100% - 150px);float:left;">
                             <div class="work marginL1 basicFont"  style="margin-bottom:20px;" v-for="item in Resume.jobExperiences">
                        <div class="base ">
                            <div class="marginR1 fontSize">{{item.companyName}}</div>
                            <div class="marginR1 time ">{{item.jobStartTime}}/{{item.jobEndTime}}</div>
                        </div>
                        <div class="base marginT1 basicFont" style="margin-bottom: 5px;display: flex;align-items:center;">
                            <div class="fontT">{{item.jobName}}</div>
                            <div class="empty1"></div>
                            <div class="fontT">{{item.licenseTypeStr}}</div>
                            <div class="empty1"></div>
                            <div class="fontT">{{item.companyTypeStr}}</div>
                            <div class="empty1"></div>
                            <div class="fontT">{{item.workCity}}</div>
                        </div>
                        <div class="WorkCont" v-html="item.jobContent">

                        </div>
                    </div>
                        </div>
                    </div>
                 
                    <!--项目经验-->
                    <div class=" marginT1 basicFont" style="line-height:36px;">
                        <div class="fontSize marginR"   style="width:140px;float:left;">项目经验:</div>
                        <div style="width:calc(100% - 150px);float:left;">
                             <div class="work marginL1 basicFont"
                             style="margin-bottom:20px;"
                         v-for="item in Resume.projectExperience">
                        <div class="base ">
                            <div class="marginR1 fontSize">{{item.projectName}}</div>
                            <div class="marginR1 time ">{{item.projectStartTime}}/{{item.projectEndTime}}</div>
                        </div>
                        <div style="margin:5px 0 0 0;" class="WorkCont" v-html="item.projectContent">

                        </div>
                    </div>
                        </div>
                    </div>
                 
                </div>
                <!--&lt;!&ndash;第四部分&ndash;&gt;-->
                <!--<div class="basic basicFont marginB">-->
                <!--<div class="titleFont">第四部分：个性特征与管理风格倾向</div>-->
                <!--<div class="marginT marginB">该候选人主要符合以下四项个性与行为特征：</div>-->
                <!--<div class="base marginT1 ">-->
                <!--<div class="fontSize marginR" style="width: 12%;">影响性:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.influence}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">情感性:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.emotion}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">独立性:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.independence}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">自律性:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.selfDiscipline}}-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
                <!--&lt;!&ndash;第五部分&ndash;&gt;-->
                <!--<div class="basic basicFont marginB">-->
                <!--<div class="titleFont">第五部分：优劣势分析</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR " style="width: 12%;">优势:</div>-->
                <!--<div class="WorkCont MT mL">-->
                <!--{{form.advantage}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">劣势:</div>-->
                <!--<div class="WorkCont MT mL">-->
                <!--{{form.disAdvantage}}-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
                <!--&lt;!&ndash;第六部分&ndash;&gt;-->
                <!--<div class="basic basicFont marginB">-->
                <!--<div class="titleFont">第六部分：核心胜任力构成</div>-->
                <!--<div class="marginT marginB">该候选人核心胜任力主要有以下7大要素：</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">人际理解力:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.personalUnderstanding}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">影响力:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.inflencePower}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">沟通协调能力:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.communicationAbility}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">团队领导能力:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.leaderShip}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">责任感:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.responsibility}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">分析思维:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.analytic}}-->
                <!--</div>-->
                <!--</div>-->
                <!--<div class="base marginT1">-->
                <!--<div class="fontSize marginR" style="width: 12%;">计划组织能力:</div>-->
                <!--<div class="WorkCont MT marginL2">-->
                <!--{{form.planningAbilit}}-->
                <!--</div>-->
                <!--</div>-->
                <!--</div>-->
                <!--&lt;!&ndash;第七部分&ndash;&gt;-->
                <!--<div class="basic basicFont marginB MB">-->
                <!--<div class="titleFont">第七部分：推荐建议</div>-->
                <!--<div class="marginT marginB">对于该候选人我们的建议是：</div>-->
                <!--<div class="WorkCont MT marginL3">-->
                <!--{{form.recommenDations}}-->
                <!--</div>-->
                <!--</div>-->
            </div>
            <div class="tab-container form" v-show="tabs==2&&edit==2">
                <h3>个人特征与管理风格倾向</h3>
                <p style="margin-top: 10px;margin-bottom:10px;">该候选人最擅长于以下
                    <input v-if="cType == 0" type="number" max="4" min="0" v-model="reportList.featureNum "
                           style="width: 40px;height:20px;text-align: center"/>
                    <span v-if="cType == 1" v-html="reportList.featureNum"></span>
                    个核心胜任力（不超过4个）
                </p>


                <el-form :model="form" ref="form1" class="content" label-width="100px">
                    <el-form-item label="影响性">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="200" show-word-limit v-model="reportList.influence"></el-input>
                        <span v-if="cType == 1" v-html="report.influence"></span>
                    </el-form-item>
                    <el-form-item label="情感性">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="200" show-word-limit v-model="reportList.emotion"></el-input>
                        <span v-if="cType == 1" v-html="report.emotion"></span>
                    </el-form-item>
                    <el-form-item label="独立性">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="200" show-word-limit v-model="reportList.independence"></el-input>
                        <span v-if="cType == 1" v-html="report.independence"></span>
                    </el-form-item>
                    <el-form-item label="自律性">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="200" show-word-limit v-model="reportList.selfDiscipline"></el-input>
                        <span v-if="cType == 1" v-html="report.selfDiscipline"></span>
                    </el-form-item>
                    <!-- <el-form-item>
                        <el-button type="primary" @click="onSubmit(1)">保存</el-button>
                        <el-button>取消</el-button>
                    </el-form-item> -->
                </el-form>
                <el-form :model="form" ref="form2" label-width="100px">
                    <h3>优劣势分析</h3>
                    <el-form-item label="优势">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="500" show-word-limit v-model="reportList.advantage"></el-input>
                        <span v-if="cType == 1" v-html="report.advantage"></span>
                    </el-form-item>
                    <el-form-item label="劣势">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="500" show-word-limit v-model="reportList.disAdvantage"></el-input>
                        <span v-if="cType == 1" v-html="report.disAdvantage"></span>
                    </el-form-item>
                    <!-- <el-form-item>
                        <el-button type="primary" @click="onSubmit(2)">保存</el-button>
                        <el-button>取消</el-button>
                    </el-form-item> -->
                </el-form>
                <el-form :model="form" ref="form3" label-width="100px">
                    <h3>核心胜任力构成</h3>
                    <p style="margin-top: 10px;margin-bottom:10px;">
                        该候选人最擅长于以下
                        <input v-if="cType == 0" type="number" max="7" min="0" v-model="reportList.coreCompetencyNum"
                               style="width: 40px;height:20px;text-align: center"/>
                        <span v-if="cType == 1" v-html="reportList.coreCompetencyNum"></span>
                        个核心胜任力（不超过7个）
                    </p>
                    <el-form-item label="人际理解力">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="200" show-word-limit v-model="reportList.personalUnderstanding"></el-input>
                        <span v-if="cType == 1" v-html="report.personalUnderstanding"></span>
                    </el-form-item>
                    <el-form-item label="影响力">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="500" show-word-limit v-model="reportList.inflencePower"></el-input>
                        <span v-if="cType == 1" v-html="report.inflencePower"></span>
                    </el-form-item>
                    <el-form-item label="沟通协调能力">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="500" show-word-limit v-model="reportList.communicationAbility"></el-input>
                        <span v-if="cType == 1" v-html="report.communicationAbility"></span>
                    </el-form-item>
                    <el-form-item label="团队领导能力">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="500" show-word-limit v-model="reportList.leaderShip"></el-input>
                        <span v-if="cType == 1" v-html="report.leaderShip"></span>
                    </el-form-item>
                    <el-form-item label="责任感">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="500" show-word-limit v-model="reportList.responsibility"></el-input>
                        <span v-if="cType == 1" v-html="report.responsibility"></span>
                    </el-form-item>
                    <el-form-item label="分析思维">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="500" show-word-limit v-model="reportList.analytic"></el-input>
                        <span v-if="cType == 1" v-html="report.analytic"></span>
                    </el-form-item>
                    <el-form-item label="计划组织能力">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="500" show-word-limit v-model="reportList.planningAbility"></el-input>
                        <span v-if="cType == 1" v-html="report.planningAbility"></span>
                    </el-form-item>
                    <!-- <el-form-item>
                        <el-button type="primary" @click="onSubmit(3)">保存</el-button>
                        <el-button>取消</el-button>
                    </el-form-item> -->
                </el-form>
                <el-form :model="form" ref="form4" label-width="100px">
                    <h3>推荐建议</h3>
                    <el-form-item label="">
                        <el-input v-if="cType == 0" type="textarea" :rows="3" :disabled="showType==1" autosize
                                  maxlength="1000" show-word-limit v-model="reportList.recommenDations"></el-input>
                        <span v-if="cType == 1" v-html="report.recommenDations"></span>
                    </el-form-item>
                    <el-form-item v-if="cType == 0">
                        <el-button type="primary" @click="onSubmit">保存</el-button>
                        <el-button>取消</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </div>
    </div>

</template>

<script>
import { format } from 'path';
  export default {
    name: 'Personnel',
    data() {
      return {
        from: undefined,//1 人才简历管理 2 企业申请沟通 3 人才确认入职 4 人才保证期
        form: {},
        tabs: '1',
        edit: '1',
        options: [],
        value: undefined,
        radio: '',
        idSeed: false,
        isActive: false,
        resumeId: '',//投递表ID
        showType: 0,//0待沟通 1 已沟通
        companyInfo: {},
        ttphone: {},
        inputIntertion: '0',//意向
        resumeHistoryId: '',
        Resume: {},
        hopeJob: [],//期望职位
        jobExperiences: [],//工作经历
        projectExperience: [],//项目经理
        licenses: [],//执业证书
        educationExperiences: [],//教育经历
        inp1: '',
        inp2: '',
        reportTemplateId: '0',

        jrrIds: '',
        talentList: [],
        reportList: {},
        cType: 1,
        line: {},
        report:{}
      }
    },
    methods: {
      // doshowResume(item){
      //     this.lAxios({
      //         method: "post", //方法
      //         url: "/platform/getTalentManagement.do", //路径，基础路径在main.js里面配置
      //         params: {
      //             //传参
      //             id :this.resumeId ,
      //         }
      //     }) .then(res => { //成功的回调函数
      //         this.companyInfo=res.data.data
      //         // console.log(this.companyInfo)
      //         this.cid=res.data.data.cid
      //         this.jid=res.data.data.jid
      //         this.doshowTalentName()
      //     }).catch(err => {
      //         //失败的回调函数
      //         // console.log(err);
      //     });
      // },
      // doshowTalentName(){
      //     this.lAxios({
      //         method: "post", //方法
      //         url: "/platform/getName.do", //路径，基础路径在main.js里面配置
      //         params: {
      //             // 传参
      //             cid:this.cid,
      //             jid:this.jid,
      //             showType:1,
      //             state:this.showType
      //         }
      //     }) .then(res => { //成功的回调函数
      //         this.options=res.data.data
      //         console.log(this.options)
      //         this.value = this.companyInfo.tid
      //         // this.resumeHistoryId =
      //         res.data.data.forEach(item=>{
      //             this.ttphone[item.id]=item.phone
      //             this.inputIntertion[item.id]=item.inputIntertion
      //             this.resumeHistoryId = localStorage.setItem('resumeHistoryId',item.resumeHistoryId)
      //         })
      //     }).catch(err => {
      //         //失败的回调函数
      //         console.log(err);
      //     });
      // },
      // ResumeInfor(){
      //     this.resumeHistoryId = localStorage.getItem('resumeHistoryId')
      //     console.log(this.resumeHistoryId)
      //     this.lAxios({
      //         method:"post",
      //         url:'/platform/selectHistoryResume.do',
      //         params:{
      //             resumeHistoryId:this.resumeHistoryId
      //         }
      //     }).then(res=>{
      //         console.log(res.data.data)
      //         this.Resume = res.data.data
      //         this.hopeJob = this.Resume.hopeJob
      //         this.jobExperiences = this.Resume.jobExperiences
      //         this.projectExperience = this.Resume.projectExperience//还没有数据 项目经历
      //         this.licenses = this.Resume.licenses
      //         this.educationExperiences = this.Resume.educationExperiences
      //         console.log(this.educationExperiences[0])
      //     })
      // },
      // init(){
      //     this.from = this.$route.params.id
      //     this.idSeed = true
      //     this.resumeId=this.$route.query.id
      //     this.showType=this.$route.query.ct
      //     this.doshowResume()
      // },
      onSubmit() {
        this._doReportTemplate()
      },
      doUpdateStateByPrimaryKey() {
        for (let item of this.options) {
          if (item.id == this.value) {
            console.log(item.jrrId)
            this._updateStateByPrimaryKey(item.jrrId)
            break
          }
        }
      },
      doSign(n) {//签订
        console.log(this.jrrId)
        if (n == this.showType) return
        let params = {
          applyComminication: n,
          relationshipId: this.jrrIds,
          reportTemplateId: this.reportTId
          // reportTemplateId:this.talentId
        }
        this.lAxios({
          method: 'post', //方法
          url: '/platform/updateStateByPrimaryKey.do', //路径，基础路径在main.js里面配置
          // data:params
          params
        }).then(res => { //成功的回调函数
          console.log('推荐报告',res)
          if(res.data.status == 1){
             this.$message({type:'warning',message:res.data.msg})
          }
          
        }).catch(err => {
          //失败的回调函数
          console.log(err)
        })
      },
      _doReportTemplate() {
        let rduser = JSON.parse(localStorage.getItem('userInfo')).id
        let params = {
          ...this.reportList,
          jrrId: this.jrrIds,
          // state:this.showType,
          talentId: this.companyInfo.tid,
          companyId: this.$route.query.comId,
          jobId: this.$route.query.jobId
          // rduser,
        }
        console.log(params)
        this.lAxios({
          method: 'post', //方法
          url: '/platform/ReportTemplate.do' + '?jrrId=' + this.jrrIds, //路径，基础路径在main.js里面配置
          data: params
          // params
        }).then(res => { //成功的回调函数
          console.log(res)
          if (res.data.status == 0) {
            this.$message({
              type: 'success',
              message: '操作成功'
            })
            // this._init()
          }
        }).catch(err => {
          //失败的回调函数
          console.log(err)
        })
      },
      _updateStateByPrimaryKey() {
        if (!this.check()) return false
        const params = {
          relationshipId: this.jrrIds,
          inputIntertion: this.companyInfo.inputIntertion,
          reportState: 1,
          commonicationState: 1
          // reportTemplateId:this.reportList.id
        }
        console.log('模板id', this.reportList.reportTemplateId)
        this.lAxios({
          method: 'post', //方法
          url: '/platform/updateStateByPrimaryKey.do', //路径，基础路径在main.js里面配置
          params
        }).then(res => { //成功的回调函数
        if(res.data.status == 0){
this.$router.replace({
            name: this.$route.name,
            params: this.$route.params,
            query: {
              ...this.$route.query,
              ct: 1
            }
          })
          this.$router.push({ path: '/TalentResume' })
        }else{
 this.$message({type:'warning',message:res.data.msg})
        }
          
          // console.log(res)
        }).catch(err => {
          //失败的回调函数
          console.log(err)
        })
      },
      _getReportTemplateInfo() {//未沟通简历
        let url = ''
        let params = { jrrId: this.jrrId }
        console.log(this.showType)
        url = '/platform/selectTemplateOrHistory.do'
        this.lAxios({
          method: 'post', //方法
          url,
          params
        }).then(res => { //成功的回调函数
          res = res.data.data
          if (res) {
            this.form = res
            if (this.showType == 0) {
              this.reportTId = res.id
            }
          } else {
            this.form = {}
          }
        }).catch(err => {
          this.form = {}
          //失败的回调函数
          console.log(err)
        })
      },
      changeTalent() {
        this.initData()
        this.getReportData()
      },
      initData() {

        this.lAxios({
          method: 'post',
          url: '/platform/getTalentManagement.do',
          params: {
            jrrId: this.jrrIds
          }

        }).then(res => {
          this.companyInfo = res.data.data
          this.Resume = res.data.data.resumeDTO
          this.Resume.title = res.data.data.resumeDTO.title.split(',')
          console.log('jrrId', this.companyInfo)
        })
      },
      getTalentList() {
        this.lAxios({
          method: 'post', //方法
          url: '/platform/getTalentName.do', //路径，基础路径在main.js里面配置
          params: {
            //传参
            comId: this.$route.query.comId,
            jobId: this.$route.query.jobId,
            state: this.$route.query.state,
            showType: this.$route.query.showType
          }
        })
          .then(res => {
            //成功的回调函数
            console.log('talent', res.data.data)
            this.talentList = res.data.data || []
            this.formateTalentList()

          })
      },
      formateTalentList() {
        this.talentList.forEach(res => {
          this.options.push({ id: res.jrrID, name: res.name })
        })

      },
      getReportData() {
        this.lAxios({
          method: 'post',
          url: '/platform/selectTemplateOrHistory.do',
          params: {
            jrrId: this.jrrIds
          }

        }).then(res => {
          this.reportList = res.data.data ? res.data.data : {}
          // this.$set(this.line,'featureNum',this.getTextAreaTo(this.reportList.featureNum))
          console.log('历史推荐报告', res.data.data)
          this.formatReportList(this.reportList)
        })
      },
      toCommunication(index) {
        if (index == 0) {
          this.$toComm.toCompany(this, this.companyInfo.cid)
        } else {
          this.$toComm.toTalent(this, this.companyInfo.cid, this.companyInfo.jid, this.companyInfo.tid)
        }

      },
      check() {
        if (this.companyInfo.inputIntertion == 0 || this.companyInfo.inputIntertion == null) {
          this.$message({
            message: '请选择人才意向',
            type: 'warning'
          })
          return false
        }
        return true
      },
      /**
       *
       * @param {*} strValue 需要修改的文本
       */
      getTextAreaTo(strValue) {
          if (strValue != null) {
        return strValue
          .replace(/\r\n/g, '<br/>')
          .replace(/\n/g, '<br/>')
          .replace(/\s/g, ' ')
      } else {
        return strValue
      }
      },
      formatReportList(reportList){
        console.log(reportList.featureNum,'report')
        this.$set(this.report, 'influence',this.getTextAreaTo(reportList.influence))
        this.$set(this.report, 'emotion',this.getTextAreaTo(reportList.emotion))
        this.$set(this.report, 'independence',this.getTextAreaTo(reportList.independence))
        this.$set(this.report, 'selfDiscipline',this.getTextAreaTo(reportList.selfDiscipline))
        this.$set(this.report, 'advantage',this.getTextAreaTo(reportList.advantage))
        this.$set(this.report, 'disAdvantage',this.getTextAreaTo(reportList.disAdvantage))
        this.$set(this.report, 'personalUnderstanding',this.getTextAreaTo(reportList.personalUnderstanding))
        this.$set(this.report, 'inflencePower',this.getTextAreaTo(reportList.inflencePower))
        this.$set(this.report, 'communicationAbility',this.getTextAreaTo(reportList.communicationAbility))
        this.$set(this.report, 'leaderShip',this.getTextAreaTo(reportList.leaderShip))
        this.$set(this.report, 'responsibility',this.getTextAreaTo(reportList.responsibility))
        this.$set(this.report, 'analytic',this.getTextAreaTo(reportList.analytic))
        this.$set(this.report, 'planningAbility',this.getTextAreaTo(reportList.planningAbility))
        this.$set(this.report, 'recommenDations',this.getTextAreaTo(reportList.recommenDations))
      }


    },
    computed: {
      jrrId() {
        let ret = ''
        this.options.forEach(item => {
          if (item.id == this.value) {
            ret = item.jrrId
          }
        })
        return ret
      },
      state() {
        let ret = ''
        this.options.forEach(item => {
          if (item.id == this.value) {
            ret = item.jrrId
          }
        })
        return ret
      }
    },
    watch: {
      value() {
        if (this.from == 1) {
          this._getReportTemplateInfo()
        }
      },
      $route() {
        this.init()
      }
    },
    created() {
      // this.init()
      // this.ResumeInfor()
      this.cType = this.$route.query.state
      console.log(this.cType)
      if (this.$route.query.jrrId) {
        this.jrrIds = parseInt(this.$route.query.jrrId)
        console.log('jrrId', this.jrrId)
      }
      this.initData()
      this.getTalentList()
      this.getReportData()
    },
    activated(){
      
    }
  }
</script>
<style lang="scss">
    /* .el-radio__input.is-disabled .el-radio__inner
    ,.el-radio__input.is-disabled.is-checked .el-radio__inner {
        background-color: #fff;
        border-color: #409EFF!important;
    }
    .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
        background-color: #C0C4CC;
    } */
    .el-radio__input.is-disabled + span.el-radio__label {
        color: #606266;
        cursor: not-allowed;
    }

    .el-radio__input.is-disabled .el-radio__inner, .el-radio__input.is-disabled.is-checked .el-radio__inner {
    }

    .el-radio__input.is-disabled.is-checked .el-radio__inner {
        background-color: #409EFF;
        border-color: #409EFF;
    }

    .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
        background-color: #fff;
    }

    .el-textarea.is-disabled .el-textarea__inner {
        background-color: #FFF;
        border-color: #DCDFE6;
        color: #606266;
        cursor: not-allowed;
    }

    .top-radio-button {
        .el-radio-button__inner {
            width: 125px;
            height: 50px;
            padding: 0px;
            display: flex;
            justify-content: center;
            align-items: center;
            border: 1px solid #ccc;
        }
    }

    .resume-tag {
        .el-tag {
            width: auto;
            padding: 7px 20px;
            line-height: 15px;
            border: none;
            border-radius: 2px;
            background: #f3f3f7;
            color: #666;
            font-size: 13px;
            margin: 0 10px 10px 0;
        }
    }

</style>

<style lang="scss" scoped>

    .shink0 {
        flex-shrink: 0;
        padding: 10px 30px;
        border-bottom: 1px solid #ccc;
    }

    .inputIntertion {
        display: flex;
        align-items: center;
    }

    .Personnel {
        box-sizing: border-box;
        width: 100%;
        height: 99%;
        overflow-y: auto;
        // border: 1px solid #797979;
        position: relative;
        padding: 1% 0 0 1%;
        display: flex;
        flex-direction: column;
        // margin-left: 10px;
    }

    .sbmt {
        height: 40px;
        width: 100px;
        position: absolute;
        top: 13%;
        left: 86%;
    }

    .title {
        height: 33px;
        line-height: 33px;
    }

    .lPersonTop {
        padding-left: 30px;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        background-color: #fff;
        position: relative;

        .btn-wrap {
            position: absolute;
            right: 20px;
            top: 44px;
        }
    }

    .Personnel > button {
        width: 70px;
        height: 29px;
        border: 1px solid #797979;
        background: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#dedede));
        position: absolute;
        top: 60px;
        right: 15px;
    }

    .tabs-btn {
        margin: 10px;
    }

    .lPersonTop_box {
        display: flex;
        align-items: center;
        width: 500px;
    }

    .lPersonTop_box > div {
        font-size: 14px;
        margin: 10px 10px;
    }

    .lPersonTop_box > span:nth-child(1) {
        font-weight: bold;
    }

    .lPerson > button {
        width: 44px;
        height: 28px;
        border: 1px solid #797979;
        background-color: white;
        border-radius: 4px;
        // margin-left: 10px;
    }

    .lselect {
        width: 161px;
    }

    .auditMain > button {
        width: 125px;
        height: 37px;
        margin-top: 20px;
        margin-bottom: 20px;
        border: 1px solid #797979;
        /*background-color: white;*/
    }

    .auditMain > button:nth-child(1) {
        margin-right: 10px;
        margin-left: 2%;
    }

    .active {
        background-color: #199ed8;
        color: #333;
    }

    .tab-container {
        flex-grow: 1;
        overflow-y: auto;
        background: #fff;
        padding: 70px 40px;
    }

    /*---------------简历----------------------*/
    .resume {
        font-size: 14px;
        color: #666;

        .user {
            .avatar {
                margin-right: 20px;
            }
           

            .base, .base2 {
                > div:not(:last-child) {

                    line-height: 1;
                    padding: 10px 0;
                }
            }
        }
    }

    .report {
        .content {
            padding: 0 30px;

            .info {
                .name {
                    width: 100px;
                }
            }
        }
    }

    .workState {
        width: 144px;
        height: 24px;
        background-color: #4AB0CF;
        border-radius: 10px 10px 10px 0px;
        color: white;
        line-height: 24px;
        text-align: center;
        margin-left: 10px;
        font-size: 14px;
    }

    /*-------------------推荐报告-人才信息-----------------------*/
    .language {
        width: 95%;
        min-height: 230px;
        color: #666;
        line-height: 25px;
        text-align: left;
        font-size: 14px;
        text-indent: 2em;
        margin-bottom: 30px;
    }

    .basic {
        text-align: left;
    }

    .titleFont {
        color: #333;
        font-size: 18px;
        font-weight: bold;
            line-height: 36px;
    }

    .basicFont {
        
    }

    .fontT {
        color: #666;
        font-size: 14px;
    }

    .fontLeft {
        margin-left: 90px;
    }

    .fontLeft1 {
        margin-left: 59px;
    }

    .marginT {
        margin-top: 29px;
    }

    .marginT1 {
        margin-top: 12px;
    }

    .marginB {
        margin-bottom: 30px;
    }

    .marginL {
        margin-left: 17%;
    }

    .fontSize {
        font-size: 16px;
        font-weight: bold;
    }

    .marginR {
        margin-right: 51px;
        line-height: 16px;
    }

    .marginR1 {
        margin-right: 30px;
        line-height: 16px;
    }

    .base {
        display: flex;
        // flex-direction: row;
        align-items: center;
     font-size: 14px;
     line-height: 36px;
        
    }

    .empty {
        width: 2px;
        height: 15px;
        background-color: #F09338;
        margin-left: 28px;
        margin-top: 4px;
    }

    .empty1 {
        width: 2px;
        height: 15px;
        background-color: #666;
        margin-left: 15px;
        margin-right: 15px;
        margin-top: 4px;
    }

    .marginR {
        margin-right: 10px;
    }

    .reportContent {
        width: 100%;
        /*height: 798px;*/
        border-top: 1px solid #DCDCDC;
        margin-top: 17px;
        color: #333;
    }

    .font {
        font-size: 20px;
        font-weight: bold;
        text-align: center;
        margin-top: 31px;
        margin-bottom: 29px;
    }

    .bergin {
        text-align: left;
        margin-left: 48px;
        color: #333;
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 19px;
    }

    .sub-color {
        color: #DD3A31;
    }

    .second-button {
        width: 125px;
        height: 50px;
        background: #EAF2FF;
        border: 1px solid #3377ff;
        color: #3377ff;
        font-size: 16px;
        // &:hover{
        //   background: #409EFF;
        //   color: #fff;
        // }
    }
    .box-line{
      display: inline-block;
      width: 3px;
      height: 16px;
      background:#F09338;
      margin-right: 6px;
    }
</style>

